package com.xdf.xzymanagementsystem.service;

import com.xdf.xzymanagementsystem.entity.UploadContract;
import com.xdf.xzymanagementsystem.util.Example;

import java.util.Date;
import java.util.List;

/**
 * 版本号：20240401
 * @Description : 服务层接口，由代码生成器自动生成
 * @Author : chanchaw
 * @Date : 2024-10-9 15:18:45
 */
public interface UploadContractService {
    UploadContract insert(UploadContract record);

    UploadContract insertSelective(UploadContract record);

    List<UploadContract> multiInsert(List<UploadContract> list);

    int updateByPrimaryKey(UploadContract record);

    int updateByPrimaryKeySelective(UploadContract record);

    // 根据主键删除
    int deleteByPrimaryKey(Integer id);
    // 根据主键查询
    UploadContract selectByPrimaryKey(Integer id);
    // 根据主键作废
    int setVoid(Integer id);

    List<UploadContract> selectAll();

    UploadContract save(UploadContract record);
    List<UploadContract> multiSave(List<UploadContract> list);

    //================= 下面是默认方法 ==================
    default void checkEntityNotNull(UploadContract record){// 返回true表示合法，可继续
        if(record == null) throw new RuntimeException("无法保存空数据！");
    }

    default UploadContract fullFill(UploadContract record){
        return record;
    }

    default void doBeforeInsert(UploadContract record){}
    default void doAfterInsert(UploadContract record){}
    List<UploadContract> selectByExample(Example<UploadContract> example);
    UploadContract moveBill(Integer id, String moveBillFlag);

    //=================以上是自动生成的代码，自定义代码请写在下面==================
    List<UploadContract> selectByContactCode(String contactCode, Integer type);

    List<UploadContract> selectByDateTime(String contactCode, Integer type, Date start, Date end);
}